<?php
/**
 * Prado Portal.
 *
 * @author Steen Rabol <steen.rabol@gmail.com>
 * @link http://www.pradoportal.dk/
 * @copyright Copyright &copy; 2006,2007,2008 Steen Rabol
 * @license http://www.pradoportal.dk
 * @version $Id: PortalHttpRequest.php 399 2011-01-04 21:14:51Z steen.rabol $
 *
 */

Prado::using('System.Web.THttpRequest');
Prado::using('Application.Common.Web.PortalUrlMapping');

class PortalHttpRequest extends THttpRequest
{
    //put your code here

	public function  init($config) 
	{		
		// Load friendly URL
		if(TPropertyValue::ensureBoolean($this->Application->Parameters['FriendlyUrl']))
		{
			$module = new PortalUrlMapping();
			$module->setConfigFile('Application.runtime.urlmap');
			$module->setEnableCustomUrl(true);
			if(isset($this->Application->Parameters['UrlPrefix']))
				$module->setUrlPrefix($this->Application->Parameters['UrlPrefix']);
			$module->init(new TXmlElement('not_used'));
			$this->Application->setModule('friendly-url',$module);
			$this->UrlManager = 'friendly-url';
		}

		parent::init($config);
	}
}
?>
